package com.itheima.model.vo;

import com.itheima.model.pojo.Dimension;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DimensionVo {

    private String key;

    private String value;

    public static DimensionVo init(Dimension dimension) {
        DimensionVo vo = new DimensionVo();
        vo.setKey(dimension.getName());
        vo.setValue(dimension.getPrice());

        return vo;
    }

}
